/* 容器布局 */
.charts-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  position: relative;
  height: 600px; /* 图表容器高度 */
}

/* 默认尺寸：折线图大，饼图小 */
.bar-chart {
  flex: 3;
  position: relative;
  transition: all 0.3s ease;
}
.pie-chart {
  flex: 2;
  position: relative;
  transition: all 0.3s ease;
}

/* 遮罩背景（渐变 + 模糊） */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(20, 20, 20, 0.9));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  cursor: pointer;
}

/* 放大状态图表容器 */
.chart-wrapper.active {
  position: fixed !important;
  top: 50%;
  left: 50%;
  width: 80vw !important;
  height: 80vh !important;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  flex: none !important;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.4s ease;
}

/* 其他图表在激活时隐藏交互 */
.chart-wrapper:not(.active) {
  opacity: 1;
  transition: opacity 0.3s ease;
}
.active ~ .chart-wrapper,
.chart-wrapper.active ~ .chart-wrapper {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

/* 放大图表关闭按钮 */
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}
.close-btn:hover {
  color: #333;
}

/* 图表放大按钮 */
.expand-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
}
.expand-btn:hover {
  color: #000;
}
